#pragma once
#include "ElementNode.h"
#include "math.h"
#include "grid3x3.h"
#include "MenuItem.h"
namespace NBGUI
{
	class GUIAPI Menu: public ElementNode, public Grid3x3
	{
	public:

		Menu(GUIDrawer* drawer, const char* name, const char* eleText, int eleType = NONE, Rect& _rect = Rect());
		Menu(GUIDrawer* drawer, const char* name, const char* eleText, vec2f* uv, int eleType = NONE, Rect& _rect = Rect());
		~Menu();

		void buildVI(std::vector<Vertex>* vertices, std::vector<unsigned int>* indices,unsigned int screenWidth, unsigned int screenHeight);

		void draw();//draw itself
		void drawItems();//items

	//	void handleEvent(Event* e);
	protected:
		vec2f uv[8];
		int state;
		
	};
}